﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UFTList.aspx.cs" Inherits="UFTList"
    MasterPageFile="~/Default.master" EnableViewState="false" %>

<%@ Register Assembly="DevExpress.Web.v9.2, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dxcb" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.2, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<asp:Content ContentPlaceHolderID="head" ID="hd" runat="server" EnableViewState="false">

    <script src="UFTList.js" type="text/javascript"></script>

    <%--<script src="js/Ajax.js" type="text/javascript"></script>

    <script src="js/FileUpload.js" type="text/javascript"></script>
    <script src="js/LOV.js" type="text/javascript"></script>

    <script src="js/Datetimepicker.js" type="text/javascript"></script>
    <!-- TinyMCE -->

    <script src="js/tiny_mce.js" type="text/javascript"></script>

    <!-- /TinyMCE -->--%>
    <link href="UFTList.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ContentPlaceHolderID="leftMenu" ID="leftnav" runat="server" EnableViewState="false">
<% Response.Write(GenerateSideMenu()); %>

</asp:Content>
<asp:Content ContentPlaceHolderID="content" ID="ctnUFTList" runat="server" EnableViewState="false">
    <div id="pnlUFTListTitle">
    </div>
    <fieldset class="m_fs_border" id="fs_UFTList">
        <legend><a class="lnk" href="javascript:toggle('UFTList');">List of Events</a>
            <%--<div id="pnlUFTList" runat="server" />--%>
        </legend>
        <dl class="m_fs">
            <div id="div_UFTList">
            
            <% if (bSubmitted) { %>
                EVENTS 
            <% } else { %>
                EVENT DRAFTS 
            <%} %>
            <dxwgv:ASPxGridView ID="dgEventList" KeyFieldName="T_RELATION_EVENT_ID" ClientInstanceName="dgEventList_c"
                runat="server" AutoGenerateColumns="true" Width="100%" Font-Size="Small">
                <Styles Header-HorizontalAlign="Center" AlternatingRow-Enabled="True" Cell-Wrap="true" Cell-Font-Size="Smaller" Header-Wrap="true"
                    Header-Font-Size="Smaller" Header-Font-Bold="true">
                    <Header Wrap="True" Font-Size="Smaller" Font-Bold="True">
                    </Header>
                    <AlternatingRow Enabled="True">
                    </AlternatingRow>
                    <Cell Wrap="True" Font-Size="Smaller">
                    </Cell>
                </Styles>
                <SettingsPager PageSize="10">
                </SettingsPager>
                <%--<Settings ShowFilterBar="Visible" ShowFilterRow="true" ShowFilterRowMenu="true" ShowHorizontalScrollBar="true" />--%>
                <SettingsBehavior AllowSort="true" />
                <%--<ClientSideEvents EndCallback="dgEventList_c_EndCallBack" />--%>
                <Columns>
                    <dxwgv:GridViewDataTextColumn FieldName="CODE" Name="CODE" Caption="EVENTS" />
                    <dxwgv:GridViewDataDateColumn FieldName="EVENT_DATE" Name="EVENT_DATE" Caption="EVENT DATE" CellStyle-HorizontalAlign="Center" />
                    <dxwgv:GridViewDataTextColumn FieldName="VIEW" Name="VIEW" CellStyle-HorizontalAlign="Center">
                        <DataItemTemplate>
                            <a href="UFTNew.aspx?eid=<%# Eval("T_RELATION_EVENT_ID").ToString() %>">View</a>
                        </DataItemTemplate>
                    </dxwgv:GridViewDataTextColumn>
                    <dxwgv:GridViewDataTextColumn FieldName="EMAIL" Name="EMAIL" CellStyle-HorizontalAlign="Center">
                        <DataItemTemplate>
                        <%# GetSetEmailColumnContent(Eval("T_RELATION_EVENT_ID").ToString(), Eval("STATUS_NEW").ToString())%>
                        </DataItemTemplate>
                    </dxwgv:GridViewDataTextColumn>
					<dxwgv:GridViewDataTextColumn FieldName="INVITE" Name="INVITE" CellStyle-HorizontalAlign="Center">
                        <DataItemTemplate>
                        <%# GetInviteColumnContent( Eval("T_RELATION_EVENT_ID").ToString(), Eval("STATUS_NEW").ToString())%>
                        </DataItemTemplate>
                    </dxwgv:GridViewDataTextColumn>
                    <dxwgv:GridViewDataTextColumn FieldName="CONFIRM" Name="CONFIRM" CellStyle-HorizontalAlign="Center">
                        <DataItemTemplate>
                        <%# GetConfirmColumnContent(Eval("T_RELATION_EVENT_ID").ToString(), Eval("STATUS_UNDANG").ToString(),
                        Eval("STATUS_CLOSE").ToString(), Eval("STATUS_CONFIRM").ToString())%>
                        </DataItemTemplate>
                    </dxwgv:GridViewDataTextColumn>
                    <dxwgv:GridViewDataTextColumn FieldName="CLOSE" Name="CLOSE" CellStyle-HorizontalAlign="Center">
                        <DataItemTemplate>
                        <%# GetCloseColumnContent(Eval("T_RELATION_EVENT_ID").ToString(), Eval("STATUS_UNDANG").ToString(),
                            Eval("STATUS_CLOSE").ToString(), Eval("STATUS_CONFIRM").ToString())%>
                        </DataItemTemplate>
                    </dxwgv:GridViewDataTextColumn>
                    <%--<dxwgv:GridViewDataTextColumn FieldName="STATUS_CLOSE" Name="STatus CLOSE" CellStyle-HorizontalAlign="Center"></dxwgv:GridViewDataTextColumn>
                    <dxwgv:GridViewDataTextColumn FieldName="STATUS_NEW" Name="STatus New" CellStyle-HorizontalAlign="Center"></dxwgv:GridViewDataTextColumn>--%>
                        
                </Columns>
            </dxwgv:ASPxGridView>
            </div>
        </dl>
    </fieldset>
</asp:Content>
